/******************************************************
/*fortran interface define
/******************************************************/
#ifndef FORTRANINTERFACE_H
#define FORTRANINTERFACE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef WIN32

#else 
        //每一个函数后面都需要加一个下划线，这是gfortran编译后的结果，必须加，否则没法使用
	    void get_all_kinds_(char *ckinds, int *icount, int *iret);                    //获取类别集
		void get_some_elements_(char *ckind, char *celenms, int *icount, int *iret); //根据单个类别获取要素集
		void get_ele_flag_(char *ckind, char *celenm, int *iflag, int *iret);        //获取时间尺度
		void get_eleg_info_(char *ckind, char *celenm, char *clayers,int *icount, int *ilon, int *ilat,  int *iret); //获取经纬度，层数
		void save_grddata_(char *ckind, char *celenm, int *ilayer, int *itimescale,int *iyear, int *imon, int *iday, int *ihr,char *path,char *grid_info,int *iret); //读取grid数据
		
		void eleg_read_(char *ckind, char *celenm, int *ilayer, int *iyear, int *imon, int *iday, int *ihr,int *ilon,int *ilat, float *griddata, char *grid_info, int *iret); //获取格点数据针对分析工具箱
		void eles_read_(char *ckind, char *celenm,  int *iyear, int *imon, int *iday, int *ihr, int *istn, float *rrdata, int *iret);
        void eles_rewrite_( char *ckindin, char *celenmin,  int *iyear, int *imon, int *iday, int *ihr,  int *istn, float *rrdata, int *iret);   //站点数据修改
        void eleg_write_(char *ckindin,char *celenmin, int *ilayer, int *iyear,int *imon, int *iday, int *ihr, int *ilon, int *ilat, float *griddata, int *iret);
		int  write_to_db_(float *data,int *datalen,int *plongitude,int *platitude,int *player,int *ptime,int *pyear,int *ptype,char *ckindin,char *celenmin);  //给要素库灌数据
#endif
#ifdef __cplusplus
}
#endif
#endif
